﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProjetCom.Model.Template;

namespace ProjetCom.Model.Pong
{
    class Raquette : Barre
    {
        public enum DirectionBare { left, right, };

        public Raquette(int p_x, int p_y, DirectionBare p_direction)
            : base(p_x, p_y)
        {
            if (p_direction == DirectionBare.left)
                m_name = "BarreLeft";
            else
                m_name = "BarreRight";
        }

        override public CoteCollision EnterCollision(Element Other)
        {

            if (this.Rectangle.Intersects(Other.Rectangle))
            {
                return Element.CoteCollision.left;
            }

            return CoteCollision.none;
        }
        
    }
}
